<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="js/ajax.js"></script>
		<script>
		
		$(function(){
			
			$('#login').click(function(){
				
				// 1 拿到用户名和密码
				
				var phone= $('#phone').val();
				var password= $('#password').val();
				
				// 2 发送请求 如果登陆成功 去add页面 权限OK的
				var url='http://localhost:8080/attendance-service/user/login.do?phone='+phone+"&password="+password;
				
				send(url,'',function(data){
					
					if(data.code==200){
						window.location.href="http://localhost:8080/attendance-service/list.html";
					}
					
				});
			});
			
			
		});
			
		</script>
	</head>
	<body>
		手机：<input type="text" id="phone" value="13112946054" /> 
		
		<br />
		<br />
		密码：<input type="password" id="password" value="123456" />
		
		<input type="button" value="登陆" id="login" />
	</body>
</html>
